.class Lrexsee/core/browser/RexseePrompt$41;
.super Ljava/lang/Object;
.source "RexseePrompt.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/RexseePrompt;->showCheckBox(Lrexsee/core/browser/clazz/PromptArgumentsSheet;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/RexseePrompt;

.field private final synthetic val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

.field private final synthetic val$checkboxes:Landroid/widget/LinearLayout;

.field private final synthetic val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;


# direct methods
.method constructor <init>(Lrexsee/core/browser/RexseePrompt;Lrexsee/core/browser/clazz/PromptArgumentsSheet;Landroid/widget/LinearLayout;Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/RexseePrompt$41;->this$0:Lrexsee/core/browser/RexseePrompt;

    iput-object p2, p0, Lrexsee/core/browser/RexseePrompt$41;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iput-object p3, p0, Lrexsee/core/browser/RexseePrompt$41;->val$checkboxes:Landroid/widget/LinearLayout;

    iput-object p4, p0, Lrexsee/core/browser/RexseePrompt$41;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    .line 816
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 6
    .param p1, "dialog"    # Landroid/content/DialogInterface;
    .param p2, "which"    # I

    .prologue
    const-string v5, "\""

    .line 819
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    .line 820
    const-string v2, ""

    .line 821
    .local v2, "rtn":Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_0
    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$41;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-object v3, v3, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->options:[Ljava/lang/String;

    array-length v3, v3

    if-lt v1, v3, :cond_0

    .line 828
    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$41;->val$returnListener:Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "["

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "]"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Lrexsee/core/browser/RexseePrompt$OnPromptReturnListener;->run(Ljava/lang/String;)V

    .line 829
    return-void

    .line 822
    :cond_0
    iget-object v3, p0, Lrexsee/core/browser/RexseePrompt$41;->val$checkboxes:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v1}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/CheckBox;

    .line 823
    .local v0, "c":Landroid/widget/CheckBox;
    invoke-virtual {v0}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v3

    if-eqz v3, :cond_2

    .line 824
    const-string v3, ""

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_1

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 825
    :cond_1
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lrexsee/core/browser/RexseePrompt$41;->val$argumentsSheet:Lrexsee/core/browser/clazz/PromptArgumentsSheet;

    iget-object v4, v4, Lrexsee/core/browser/clazz/PromptArgumentsSheet;->options:[Ljava/lang/String;

    aget-object v4, v4, v1

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 821
    :cond_2
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method
